package com.im.gate;

import com.rou.im.framework.boot.starter.builder.ProcessorStackBuilder;
import com.rou.im.framework.boot.starter.postprocessor.ProcessorStackConfigurerAdapter;
import com.rou.im.framework.core.Request;
import com.rou.im.framework.core.Response;
import com.rou.im.framework.core.processorstack.TargetAction;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

/**
 * <p></p>
 *
 * @author GaoShuangWen
 * @since 2020-05-27 9:40
 */
@Component
public  class PSConfig extends ProcessorStackConfigurerAdapter {

    public void configure(ProcessorStackBuilder builder) throws Exception {
        builder.action(new TargetAction() {
            @Override
            public Response execute(Request request) {
                System.out.println("ewqqqqqqqqqdfsfsdafdsfsfsadf");
                int i =1/0;
                return null;
            }
        });
    }

}
